import axios from "../../utils/axios/axios";
import qs from "qs";
export const searchAllGoods = () => {
  const url = "/demo/php/searchAllGoods.php";
  return axios.get(url);
};
export const loginNow = (payload) => {
  const url = "/php/login_account.php";
  return axios.post(url, qs.stringify(payload));
};
export const getGoodsInfo = (payload) => {
  const url = "/php/searchGoodsByGoodsId.php";
  return axios.get(url, {
    params: payload,
  });
};

export const addShoppingCar = (payload) => {
  const url = "/php/addToShoppingCar.php";
  return axios.post(url, qs.stringify(payload));
};

export const searchShoppingCarByUser = (payload) => {
  const url = "/php/searchShoppingCarByUser.php";
  return axios.post(url, qs.stringify(payload));
};
export const delGoods = (payload) => {
  const url = "/php/deleteShoppingCarById.php";
  return axios.get(url, {
    params: payload,
  });
};
